home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Utilities / Appsprites / APPMAKER CODE / MODIFIED APPMAKER CODE / Dispatcher.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-11  |  2.5 KB  |  153 lines  |  [TEXT/KAHL]

  1. /* Dispatcher.c -- dispatcher for windows and for modeless dialogs */
  2. /* Created 7/11/93 11:43 AM by AppMaker */
  3.  
  4. #include <Types.h>
  5. #include <Quickdraw.h>
  6. #include <Controls.h>
  7. #include <Dialogs.h>
  8. #include <Events.h>
  9. #include <Lists.h>
  10. #include <Menus.h>
  11. #include <TextEdit.h>
  12. #include "MainWindow.h"
  13. #include "Globals.h"
  14. #include "Dispatcher.h"
  15.  
  16. /*----------*/
  17. void DoIdle (void)
  18. {
  19.     PerformSimpleAnimation();
  20. } /*DoIdle*/
  21.  
  22. /*----------*/
  23. void OpenWindows    (Str255            fName,
  24.                      short            vRefNum,
  25.                      short            fRefNum)
  26. {
  27.  
  28.     OpenMainWindow (fName, vRefNum, fRefNum);
  29.     
  30. } /*OpenWindows*/
  31.  
  32. /*----------*/
  33. void CloseCurWindow (void)
  34. {
  35.     switch (cur->windowKind) {
  36.         case WMainWindow:
  37.                 CloseMainWindow ();
  38.             break;
  39.         
  40.     } /*switch*/
  41. } /*CloseCurWindow*/
  42.  
  43. /*----------*/
  44. void DoControl         (ControlHandle    whichControl,
  45.                      short             whichPart,
  46.                      Point             where)
  47. {
  48.     switch (cur->windowKind) {
  49.         case WMainWindow:
  50.                 ControlMainWindow (whichControl, whichPart, where);
  51.             break;
  52.         
  53.     } /*switch*/
  54. } /*DoControl*/
  55.  
  56. /*----------*/
  57. void MouseInContent    (Point        where,
  58.                      short        modifiers)
  59. {
  60.     switch (cur->windowKind) {
  61.         case WMainWindow:
  62.                 MouseInMainWindow (where, modifiers);
  63.             break;
  64.         
  65.     } /*switch*/
  66. } /*MouseInContent*/
  67.  
  68. /*----------*/
  69. void TypeInWindow    (char    ch)
  70. {
  71.     switch (cur->windowKind) {
  72.         case WMainWindow:
  73.                 TypeInMainWindow (ch);
  74.             break;
  75.         
  76.     } /*switch*/
  77. } /*TypeInWindow*/
  78.  
  79. /*----------*/
  80. void UpdateContent (void)
  81. {
  82.     switch (cur->windowKind) {
  83.         case WMainWindow:
  84.                 UpdateMainWindow ();
  85.             break;
  86.         
  87.     } /*switch*/
  88. } /*UpdateContent*/
  89.  
  90. /*----------*/
  91. void ActivateContent (Boolean    activate)
  92. {
  93.     switch (cur->windowKind) {
  94.         case WMainWindow:
  95.                 ActivateMainWindow (activate);
  96.             break;
  97.         
  98.     } /*switch*/
  99. } /*ActivateContent*/
  100.  
  101. /*----------*/
  102. void ResizeContent (void)
  103. {
  104.     switch (cur->windowKind) {
  105.         case WMainWindow:
  106.                 ResizeMainWindow ();
  107.             break;
  108.         
  109.     } /*switch*/
  110. } /*ResizeContent*/
  111.  
  112. /*----------*/
  113. pascal void ScrollWindow    (short        newValue,
  114.                              short        oldValue)
  115. {
  116.     switch (cur->windowKind) {
  117.         case WMainWindow:
  118.                 ScrollMainWindow (newValue, oldValue);
  119.             break;
  120.  
  121.     } /*switch*/
  122. } /*ScrollWindow*/
  123.  
  124. /*----------*/
  125. void InitModelessDialogs (void)
  126. {
  127.     
  128. } /*InitModelessDialogs*/
  129.  
  130. /*----------*/
  131. void CloseModelessDialog (DialogPtr        whichDialog)
  132. {
  133.     
  134. } /*CloseModelessDialog*/
  135.  
  136. /*----------*/
  137. Boolean FilterModeless    (DialogPtr        whichDialog,
  138.                          EventRecord    *event,
  139.                          short            *itemHit)
  140. {
  141.     
  142.     return (false);
  143. } /*FilterModeless*/
  144.  
  145. /*----------*/
  146. void DoModelessItem        (DialogPtr        whichDialog,
  147.                          short            itemNr)
  148. {
  149.     
  150. } /*DoModelessItem*/
  151.  
  152. /* Dispatcher */
  153.